import netifaces

def get_mac():
    eths = netifaces.interfaces()
    for eth in eths:
        for adds in netifaces.ifaddresses(eth)[netifaces.AF_LINK]:
            yield adds['addr']